﻿using System.Windows.Forms;
using ESRI.ArcGIS.ArcMapUI;


namespace ODM_AddIn
{
    public class SetDecisionVariablesButton : ESRI.ArcGIS.Desktop.AddIns.Button
    {

        public SetDecisionVariablesButton()
        {
        }

        protected override void OnClick()
        {
            if (ODM_Code.rUtils.CheckInit())
            {
                //MessageBox.Show("Set Decision Variables is under development", "Under Development");
                IMxDocument doc = ArcMap.Application.Document as IMxDocument;
                ODM_Code.Forms.SetDecisionVariablesForm sdvf = new ODM_Code.Forms.SetDecisionVariablesForm(doc);
                sdvf.Activate();
                sdvf.BringToFront();
                sdvf.ShowDialog();
            }
            else
            {
                MessageBox.Show("Please first select the analysis area by clicking the \"Select Analysis Area\" button.", "Missing Analysis Area Parameter");
            }
        }

        protected override void OnUpdate()
        {
        }
    }
}
